﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/FrameMain.Master"
    AutoEventWireup="true" CodeBehind="FormDetail.aspx.cs" Inherits="Jzy.Web.WorkFlow.Fore.FormDetail" %>
<%@ Register src="Controls/Approves.ascx" tagname="Approves" tagprefix="uc2" %>
<%@ Register src="Controls/FlowStatus.ascx" tagname="FlowStatus" tagprefix="uc3" %>

<%@ Register src="Controls/Attachs.ascx" tagname="Attachs" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <asp:Literal ID="litHead" runat="server"></asp:Literal>

    <script type="text/javascript">
        function tab_click(sender, index)
        {
            var li = sender.parentNode;
            var lis = sender.parentNode.parentNode.getElementsByTagName("li");
            if (li.className != "on")
            {
                for (var i = 0; i < lis.length; i++)
                {
                    if (lis[i].className == "on")
                    {
                        lis[i].className = "";
                    }
                    document.getElementById("div" + i).style.display = "none";
                }
                li.className = "on";
                document.getElementById("div" + index).style.display = "";
            }
        }

        var fromType = '1'; //表单是怎么传过来的，0为新建

        var addRight = true;
      
    </script>

    <script type="text/javascript" src="DoForm.js"></script>

    <script type="text/javascript" src="../../Common/Js/Silverlight.js"></script>

    <script type="text/javascript">
        function onSilverlightError(sender, args)
        {
            var appSource = "";
            if (sender != null & sender != 0)
            {
                appSource = sender.getHost().Source;
            }

            var errorType = args.ErrorType;
            var iErrorCode = args.ErrorCode;

            if (errorType == "ImageError" || errorType == "MediaError")
            {
                return;
            }

            var errMsg = "Silverlight 应用程序中未处理的错误 " + appSource + "\n";

            errMsg += "代码: " + iErrorCode + "    \n";
            errMsg += "类别: " + errorType + "       \n";
            errMsg += "消息: " + args.ErrorMessage + "     \n";

            if (errorType == "ParserError")
            {
                errMsg += "文件: " + args.xamlFile + "     \n";
                errMsg += "行: " + args.lineNumber + "     \n";
                errMsg += "位置: " + args.charPosition + "     \n";
            }
            else if (errorType == "RuntimeError")
            {
                if (args.lineNumber != 0)
                {
                    errMsg += "行: " + args.lineNumber + "     \n";
                    errMsg += "位置: " + args.charPosition + "     \n";
                }
                errMsg += "方法名称: " + args.methodName + "     \n";
            }

            throw new Error(errMsg);
        }
    </script>

    <style type="text/css">
        div.file
        {
            width: 400px;
            margin: auto;
        }
        div.file div
        {
            height: 35px;
            line-height: 35px;
            text-align: left;
        }
        div.file div input
        {
            width: 400px;
        }
        div.file div span
        {
            font-size: 14px;
        }
        div#list table tr td
        {
            text-align: left;
            padding-left: 10px;
        }
        div#list table tr td.empty
        {
            text-align: center;
        }
        div#list table tr td.title
        {
            font-weight: bold;
            color: Green;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="toolbar">
        <ul>
            <li><a id="lnkCancel" runat="server" href="javascript:history.back();"><span><b style="background-image: url(../../common/images/common/return.gif);">
                &nbsp;</b><asp:Literal ID="Literal12" runat="server" Text="返回"></asp:Literal></span></a></li></ul>
    </div>
    <div id="top_daohang" class="tab" style="margin-top: 10px;">
        <ul>
            <asp:Repeater ID="rpt" runat="server" EnableViewState="true">
                <ItemTemplate>
                    <li class=''>
                        <div class="menu_l">
                        </div>
                        <div class="menu_r">
                        </div>
                        <a id='lnk_<%#Eval("ID") %>' onclick='tab_click(this,"<%#Eval("ID") %>")'>
                            <%#Eval("Name") %></a> </li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
    </div>
    <div id="divMain" style="text-align: center; overflow: auto; padding-top: 10px;">
        <!--一加height=20水平滚动条就没了-->
        <div id="div0" style="min-height: 20px;">
            <div style="margin: auto; width: 90%;">
                <asp:Literal ID="litForm" runat="server" EnableViewState="false"></asp:Literal>
            </div>
        </div>
        <div id="div1">
            <uc1:attachs id="Attachs1" runat="server" />
        </div>
        <div id="div2">
            <uc2:approves id="Approves1" runat="server" />
        </div>
        <div id="div3" style="height:100%; overflow:hidden;">
            <uc3:flowstatus id="FlowStatus1" runat="server" />
        </div>
        <div style="height: 20px; line-height: 20px;">
        </div>
    </div>

    <script type="text/javascript">
        tab_click(document.getElementById("lnk_0"), 0);

        
    </script>

</asp:Content>
